import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm'
import { Account } from 'src/modules/account/entities/account.entity'
import { Staff } from 'src/modules/staff/entities/staff.entity'
import { App } from 'src/app.entity'
@Entity()
export class Salary extends App {
  @ManyToOne(() => Staff)
  @JoinColumn({ name: 'staff_id' })
  staff: Staff
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'lunch_salary' })
  lunchSalary: number
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'traffic_salary' })
  trafficSalary: number
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'basic_salary' })
  basicSalary: number
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'award_salary' })
  awardSalary: number
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'fine_salary' })
  fineSalary: number
  @Column({ type: 'decimal', precision: 10, scale: 2, name: 'total_salary' })
  totalSalary: number
  @Column({ type: 'varchar', length: 20, nullable: true })
  remark?: string
}
